# Dockerfile.plugin_daemon
FROM langgenius/dify-plugin-daemon:0.0.7-local

##CAE_COMMON_VARS_PLACE_HOLDER##

##DIFY_COMMON_VARS_PLACE_HOLDER##

ENV DB_DATABASE=${DB_PLUGIN_DATABASE:-dify_plugin} \
    SERVER_PORT=${PLUGIN_DAEMON_PORT:-5002} \
    SERVER_KEY=${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi} \
    MAX_PLUGIN_PACKAGE_SIZE=${PLUGIN_MAX_PACKAGE_SIZE:-52428800} \
    PPROF_ENABLED=${PLUGIN_PPROF_ENABLED:-false} \
    DIFY_INNER_API_URL=${PLUGIN_DIFY_INNER_API_URL:-http://api:5001} \
    DIFY_INNER_API_KEY=${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1} \
    PLUGIN_REMOTE_INSTALLING_HOST=${PLUGIN_DEBUGGING_HOST:-0.0.0.0} \
    PLUGIN_REMOTE_INSTALLING_PORT=${PLUGIN_DEBUGGING_PORT:-5003} \
    PLUGIN_WORKING_PATH=${PLUGIN_WORKING_PATH:-/app/storage/cwd} \
    FORCE_VERIFYING_SIGNATURE=${FORCE_VERIFYING_SIGNATURE:-true} \
    PYTHON_ENV_INIT_TIMEOUT=${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120} \
    PLUGIN_MAX_EXECUTION_TIMEOUT=${PLUGIN_MAX_EXECUTION_TIMEOUT:-600} \
    PIP_MIRROR_URL=${PIP_MIRROR_URL:-} \
    PLUGIN_STORAGE_TYPE=${PLUGIN_STORAGE_TYPE:-local} \
    PLUGIN_STORAGE_LOCAL_ROOT=${PLUGIN_STORAGE_LOCAL_ROOT:-/app/storage} \
    PLUGIN_INSTALLED_PATH=${PLUGIN_INSTALLED_PATH:-plugin} \
    PLUGIN_PACKAGE_CACHE_PATH=${PLUGIN_PACKAGE_CACHE_PATH:-plugin_packages} \
    PLUGIN_MEDIA_CACHE_PATH=${PLUGIN_MEDIA_CACHE_PATH:-assets} \
    PLUGIN_STORAGE_OSS_BUCKET=${PLUGIN_STORAGE_OSS_BUCKET:-} \
    S3_USE_AWS_MANAGED_IAM=${PLUGIN_S3_USE_AWS_MANAGED_IAM:-} \
    S3_ENDPOINT=${PLUGIN_S3_ENDPOINT:-} \
    S3_USE_PATH_STYLE=${PLUGIN_S3_USE_PATH_STYLE:-} \
    AWS_ACCESS_KEY=${PLUGIN_AWS_ACCESS_KEY:-} \
    PAWS_SECRET_KEY=${PLUGIN_AWS_SECRET_KEY:-} \
    AWS_REGION=${PLUGIN_AWS_REGION:-} \
    AZURE_BLOB_STORAGE_CONNECTION_STRING=${PLUGIN_AZURE_BLOB_STORAGE_CONNECTION_STRING:-} \
    AZURE_BLOB_STORAGE_CONTAINER_NAME=${PLUGIN_AZURE_BLOB_STORAGE_CONTAINER_NAME:-} \
    TENCENT_COS_SECRET_KEY=${PLUGIN_TENCENT_COS_SECRET_KEY:-} \
    TENCENT_COS_SECRET_ID=${PLUGIN_TENCENT_COS_SECRET_ID:-} \
    TENCENT_COS_REGION=${PLUGIN_TENCENT_COS_REGION:-}

EXPOSE ${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}

VOLUME /app/storage